﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsRemoteScripting.Action
{
    public class AddClassCaption  : AbstractCommand
    {
        public override void Run(object sender, EventArgs e)
        {
            WindowInfo info = WindowFinder.RetrieveCurrentWindowInfo();
            Form1.m_Form.textBoxScript.Text += CreateClassCaptionString(info);
        }

        private static string CreateClassCaptionString(WindowInfo info)
        {
            return string.Format("{0}\r\n{1}\r\n{2}\r\n{3}\r\n", info.Caption, info.ClassName, info.ModuleFilename, info.Handle);
        }
    }
}
